package com.cn.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cn.entity.Angel;
import com.cn.mapper.AngelMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AngelService {
    @Resource
    AngelMapper angelMapper;

    /**
     * 列表查询
     * @return
     */
    public List<Angel> queryAngels(){
        Page<Angel> page = new Page<>(1,1);
        List list = angelMapper.selectList(page);
        long total = page.getTotal();
        return angelMapper.selectList(page);
    }

    /**
     * 根据ID查询角度
     * @param ID 角度ID
     * @return angel
     */
    public Angel getAngelByID(String ID){
        return angelMapper.getAngelByID(ID);
    }
}
